{% extends "wechat/layout.html" %}

{% set title = '学习记录' %}
{% block contents %}
<div class="m-finished">
    <div class="title">
        <h3 class="name">{{ data.number }}.{{ data.lesson }}</h3>
        {% if data.remark_class == 'unfinished' %}
        <div class="date">{{ data.remark }}</div>
        {% endif %}
    </div>
    <div class="agent">
        <div class="date">{% if data.time %}开课时间：{{ data.time[:2] }}月{{ data.time[-2:] }}日{% endif %}</div>
        <div class="agent-name">机构名称: {{ data.school_name }}</div>
        <div>
            <span class="teacher">教师：{{ data.teacher_name }}</span>
            <!-- <span class="student">学生姓名: {{ data.student_name }}</span> -->
        </div>
    </div>
    {% if data.remark_class != 'unfinished' %}
    <h3 class="score {{ data.remark_class }}">{{ data.remark }}</h3>
    {% endif %}
    <div class="points">
        <h3 class="name">乐理知识</h3>
        {% for knowlege in data.knowledge %}
            <span class="point">{{ loop.index }}.{{ data.knowledge[loop.index -1] }}</span>
        {% endfor %}
    </div>
    <div class="m-sections">
        {% if course_map == 'course_adults' or course_map == 'course_xi_yang_hong' %}
            <ul class="sections">
                <li class="section{% if 'pk_kara' in data %}"><!--未进行添加时是section notgoing-->
                    <span class="name">卡拉PK</span>
                    <div class="right">
                        {% if not data.pk_kara.score %}
                            无卡拉PK
                        {% else %}
                            <span class="fenshu">{{ data.pk_kara.score}}</span>
                            <span class="sub">分</span>
                        {% endif %}
                    </div>
                    {% else %} notgoing">
                        <span class="name">卡拉PK</span>
                        <div class="right">未进行</div>
                    {% endif %}
                </li>
                <li class="section{% if 'pk_part' in data %}">
                    <span class="name">分句PK</span>
                    <div class="right">
                        {% if not data.pk_part.score %}
                            无分句PK
                        {% else %}
                            <span class="fenshu">{{ data.pk_part.score}}</span>
                            <span class="sub">分</span>
                        {% endif %}
                    </div>
                    {% else %} notgoing">
                        <span class="name">分句PK</span>
                        <div class="right">未进行</div>
                    {% endif %}
                </li>
                <li class="section{% if 'pk_score_slow' in data %}"{% if data.pk_score_slow.exist_pic %} onclick="location.href='{{ url_for('wechat.record_images', active_id=data.pk_score_slow.activity_id) }}'"{% endif %}>
                    <span class="name">曲谱PK(慢速)</span>
                    <div class="right">
                        <span class="fenshu">{{ data.pk_score_slow.score}}</span>
                        <span class="sub">分</span>
                            {%- if data.pk_score_slow.exist_pic %}
                        <i class="iconfont icon-file"></i>
                            {% endif -%}
                    </div>
                    {% else %} notgoing">
                        <span class="name">曲谱PK(慢速)</span>
                        <div class="right">未进行</div>
                    {% endif %}
                </li>
                <li class="section{% if 'pk_score_mid' in data %}"{% if data.pk_score_mid.exist_pic %} onclick="location.href='{{ url_for('wechat.record_images', active_id=data.pk_score_mid.activity_id) }}'"{% endif %}>
                    <span class="name">曲谱PK(中速)</span>
                    <div class="right">
                        <span class="fenshu">{{ data.pk_score_mid.score}}</span>
                        <span class="sub">分</span>
                            {%- if data.pk_score_mid.exist_pic %}
                        <i class="iconfont icon-file"></i>
                            {% endif -%}
                    </div>
                    {% else %} notgoing">
                        <span class="name">曲谱PK(中速)</span>
                        <div class="right">未进行</div>
                    {% endif %}
                </li>
                <li class="section{% if 'pk_score' in data %}"{% if data.pk_score.exist_pic %} onclick="location.href='{{ url_for('wechat.record_images', active_id=data.pk_score.activity_id) }}'"{% endif %}>
                    <span class="name">曲谱PK(原速)</span>
                    <div class="right">
                        <span class="fenshu">{{ data.pk_score.score}}</span>
                        <span class="sub">分</span>
                            {%- if data.pk_score.exist_pic %}
                        <i class="iconfont icon-file"></i>
                            {% endif -%}
                    </div>
                    {% else %} notgoing">
                        <span class="name">曲谱PK(原速)</span>
                        <div class="right">未进行</div>
                    {% endif %}
                </li>
                <li class="section{% if 'test_play' in data %}"{% if data.test_play.exist_pic %} onclick="location.href='{{ url_for('wechat.record_images', active_id=data.test_play.activity_id) }}'"{% endif %}>
                    <span class="name">演奏</span>
                    <div class="right">
                        <span class="fenshu">{{ data.test_play.score}}</span>
                        <span class="sub">分</span>
                            {%- if data.test_play.exist_pic %}
                        <i class="iconfont icon-file"></i>
                            {% endif -%}
                    </div>
                    {% else %} notgoing">
                        <span class="name">演奏</span>
                        <div class="right">未进行</div>
                    {% endif %}
                </li>
            </ul>
        {% else %}
            <ul class="sections">
                <li class="section{% if 'pk_part' not in data %} notgoing{% endif %}"><!--未进行添加时是section notgoing-->
                    <span class="name">分句PK</span>
                    <div class="right">
                        {% if 'pk_part' in data and data.pk_part.score != "" %}
                        <span class="fenshu">{{ data.pk_part.score}}</span>
                        <span class="sub">分</span>
                        {% else %}
                        未进行
                        {% endif %}
                    </div>
                </li>
                <li class="section{% if 'pk_full' not in data %} notgoing"{% else %}"{% if data.pk_full.exist_pic %} onclick="location.href='{{ url_for('wechat.record_images', active_id=data.pk_full.activity_id) }}'"{% endif %}{% endif %}>
                    <span class="name">全曲PK</span>
                    <div class="right">
                        {% if 'pk_full' in data and data.pk_full.score != "" %}
                        <span class="fenshu">{{ data.pk_full.score}}</span>
                        <span class="sub">分</span>
                            {%- if data.pk_full.exist_pic %}
                        <i class="iconfont icon-file"></i>
                            {% endif -%}
                        {% else %}
                        未进行
                        {% endif %}
                    </div>
                </li>
                <li class="section{% if 'test_play' not in data %} notgoing"{% else %}"{% if data.test_play.exist_pic %} onclick="location.href='{{ url_for('wechat.record_images', active_id=data.test_play.activity_id) }}'"{% endif %}{% endif %}>
                    <span class="name">小考核－演奏</span>
                    <div class="right">
                        {% if 'test_play' in data and data.test_play.score != "" %}
                        <span class="fenshu">{{ data.test_play.score}}</span>
                        <span class="sub">分</span>
                            {%- if data.test_play.exist_pic %}
                        <i class="iconfont icon-file"></i>
                            {% endif -%}
                        {% else %}
                        未进行
                        {% endif %}
                    </div>
                </li>
                <li class="section{% if 'test_music_theory' not in data %} notgoing{% endif %}">
                    <span class="name">小考核－乐理</span>
                    <div class="right">
                        {% if 'test_music_theory' in data and data.test_music_theory.score != "" %}
                        <span class="fenshu">{{ data.test_music_theory.score}}</span>
                        {% else %}
                        未进行
                        {% endif %}
                    </div>
                </li>
                <li class="section{% if 'test_listen' not in data %} notgoing{% endif %}">
                    <span class="name">小考核－听力</span>
                    <div class="right">
                        {% if 'test_listen' in data and data.test_listen.score != "" %}
                        <span class="fenshu">{{ data.test_listen.score}}</span>
                        {% else %}
                        未进行
                        {% endif %}
                    </div>
                </li>
            </ul>
        {% endif %}
    </div>
    <!-- <div class="share">
        <i class="iconfont icon-share"></i>
        <span>截图分享</span>
    </div> -->
</div>
{% endblock %}
